package com.ies.dx.dex.file;

import java.util.Vector;

import com.ies.dx.util.Input;

public class annotations_directory_item extends dex_item
{
    private int class_annotations_off; // uint   
    private int fields_size;  // uint  
    private int annotated_methods_size; // uint  
    private int annotated_parameters_size; // uint  
    private Vector field_annotations; //field_annotation  
    private Vector method_annotations; //method_annotation  
    private Vector parameter_annotations; //parameter_annotation  

    public annotations_directory_item(dex_file file)
    {
        super(file);
    }

    public void read(Input dis)
    {
        try
        {
            class_annotations_off = dis.readInt();
            fields_size = dis.readInt();
            annotated_methods_size = dis.readInt();
            annotated_parameters_size = dis.readInt();
            
            for (int i = 0; i < fields_size; i ++)
            {
                field_annotation fn = new field_annotation(mFile);
                fn.read(dis);
                field_annotations.add(fn);
            }
            
            for (int i = 0; i < annotated_methods_size; i ++)
            {
                method_annotation mn = new method_annotation(mFile);
                mn.read(dis);
                method_annotations.add(mn);
            }
            
            for (int i = 0; i < annotated_parameters_size; i ++)
            {
                parameter_annotation pn = new parameter_annotation(mFile);
                pn.read(dis);
                parameter_annotations.add(pn);
            }
            
        }
        catch (Exception e) 
        {
            e.printStackTrace();
        }
    }
    
    public void show()
    {
        
    }

    public String getData()
    {
        return null;
    }

    @Override
    public void readData(Input dis)
    {
        // TODO Auto-generated method stub
        
    }
    
    

}
